Up-sampling binary images for segmentation

ABSTRACT

A method of up-sampling binary images for segmentation is described. In an embodiment, digital images are down-sampled before segmentation. The resulting initial binary segmentation, which has a lower resolution than the original image, is then up-sampled and smoothed to generate an interim non-binary solution which has a higher resolution than the initial binary segmentation. The final binary segmentation for the image is then computed from the interim non-binary solution based on a threshold. This method does not use the original image data in inferring the final binary segmentation solution from the initial binary segmentation. In an embodiment, the method may be applied to all images and in another embodiment, the method may be used for images which comprise a large number of pixels in total or in single dimension and smaller images may not be down-sampled before segmentation.

RELATED APPLICATION

This application is a continuation of, and claims priority to, U.S. Pat.No. 8,411,948, filed on Mar. 5, 2010, issued on Apr. 2, 2013, andentitled “UP-SAMPLING BINARY IMAGES FOR SEGMENTATION.” The disclosure ofthe above-identified application is hereby incorporated by reference inits entirety as if set forth herein in full.

BACKGROUND

A number of techniques have been proposed to enable extraction of theforeground from a scene, for example, the extraction of a person from adigital image showing the person standing in front of a scenic view.This process of splitting an image into the foreground and background isknown as image segmentation. Image segmentation comprises labeling Imageelements (such as pixels, groups of pixels, voxels or groups of voxels)as either a foreground or a background image element. This is useful indigital photography, medical image analysis, and other applicationdomains where it is helpful to find a boundary between an object in theimage and a background. The object and the background may then beprocessed separately, differently, etc. In the case of a medical imageit may be appropriate to segment out a region of an image depicting atumor or organ such as the lungs in order to enable a surgeon tointerpret the image data.

As digital camera and other image acquisition technology develops,however, the resolution of the digital images being captured isincreasing rapidly and as a result the size of image files is alsoincreasing rapidly. Images of 10-20 MPixels are now not uncommon andmany mobile phones contain cameras capable of capturing images of fiveMPixels or more. Medical imaging systems can acquire 3D volumes withbillions of voxels. In addition to requiring larger storage units (bothin the digital camera and for off-camera storage), these larger imagefile sizes require significantly more processing to achieve imagesegmentation. If known image segmentation techniques are applied to suchhigh-resolution images, the process can be very slow and a user mayexperience unacceptable delays.

The embodiments described below are not limited to implementations whichsolve any or all of the disadvantages of known image segmentationtechniques.

SUMMARY

The following presents a simplified summary of the disclosure in orderto provide a basic understanding to the reader. This summary is not anextensive overview of the disclosure and it does not identifykey/critical elements of the invention or delineate the scope of theinvention. Its sole purpose is to present some concepts disclosed hereinin a simplified form as a prelude to the more detailed description thatis presented later.

A method of up-sampling binary images for segmentation is described. Inan embodiment, digital images are down-sampled before segmentation. Theresulting initial binary segmentation, which has a lower resolution thanthe original image, is then up-sampled and smoothed to generate aninterim non-binary solution which has a higher resolution than theinitial binary segmentation. The final binary segmentation solution forthe image is then computed from the interim non-binary solution based ona threshold. This method does not use the original image data ininferring the final binary segmentation solution from the initial binarysegmentation. In an embodiment, the method may be applied to all imagesand in another embodiment, the method may be used for images whichcomprise a large number of pixels in total or in single dimension andsmaller images may not be down-sampled before segmentation.

Many of the attendant features will be more readily appreciated as thesame becomes better understood by reference to the following detaileddescription considered in connection with the accompanying drawings.

DESCRIPTION OF THE DRAWINGS

The present description will be better understood from the followingdetailed description read in light of the accompanying drawings,wherein:

FIG. 1 is a schematic diagram of an image labeling system;

FIG. 2 is a flow diagram of an example method of performing imagesegmentation;

FIG. 3 is a flow diagram of an example method of image segmentation;

FIG. 4 shows a flow diagram of an example method of up-scaling;

FIG. 5 shows a flow diagram of another example method of up-scaling anda graphical representation of this method;

FIG. 6 shows a graphical representation of an optimization of theup-scaling process;

FIG. 7 is a flow diagram of another example method of performing imagesegmentation;

FIG. 8 is a schematic diagram of a user interface for performing imagesegmentation; and

FIG. 9 illustrates an exemplary computing-based device in whichembodiments of the methods described herein may be implemented.

Like reference numerals are used to designate like parts in theaccompanying drawings.

DETAILED DESCRIPTION

The detailed description provided below in connection with the appendeddrawings is intended as a description of the present examples and is notintended to represent the only forms in which the present example may beconstructed or utilized. The description sets forth the functions of theexample and the sequence of steps for constructing and operating theexample. However, the same or equivalent functions and sequences may beaccomplished by different examples.

Although the present examples are described and illustrated herein asbeing implemented in an image labeling system for foreground/backgroundimage segmentation, the system described is provided as an example andnot a limitation. As those skilled in the art will appreciate, thepresent examples are suitable for application in a variety of differenttypes of image labeling systems and a non-exhaustive list of examplesis: 3D reconstruction, stereo matching, object segmentation, objectrecognition and optical flow.

FIG. 1 is a schematic diagram of an image labeling system 100implemented using a computer or processor of any suitable type. It isarranged to receive an image 101 as input and to provide as output alabeled version of that image 104 comprising, for each of a plurality ofimage elements, one of a specified plurality of possible labels. Animage element may be a pixel, a group of pixels, a voxel or a group ofvoxels and the plurality of image elements may comprise all the imageelements in the image or the image elements in one or more portions ofthe image. The term “image” is used herein in a broad sense to includedigital still images such as photographs, video stills, or other digital2D images, medical images such as CT scans, MRI scans or other digitalmedical images, digital 3D images or higher dimensional images such asobtained from Z-cameras, voxel volumes, satellite imaging systems,ultra-sound scans, as well as sequences of images such as videos, orother captured or generated sequences of images. The image labelingsystem optionally receives user input 102 specifying “seeds” for thelabeling in the case that the image labeling uses an interactivesegmentation algorithm. The image labeling system also optionallyreceives a user specified threshold 103, although in some embodiments,this may not be user specified and may be set to a fixed value orautomatically configured by the image labeling system itself.

The image labeling system 100 may comprise a down-scaling engine 105arranged to reduce the resolution of the input image 101 as described inmore detail below. The image labeling system 100 may also comprise animage segmentation engine 106, an up-scaling and smoothing engine 107and a thresholding engine 108 and the operation of these engines isdescribed in more detail below. In some embodiments, the image labelingsystem 100 may further comprise a selection engine 109 and operation ofthis engine is described below with reference to FIG. 7.

FIG. 2 is a flow diagram of an example method of performing imagesegmentation on an image, which may be an image comprising a largenumber of pixels, e.g. a 10 MPixel image. This method (and the othermethods described herein) is described with reference to segmenting aforeground region from a background region in a digital image. However,it may be applied to other types of image labeling problem. It will alsobe appreciated that as camera technology advances, the numbers of pixelsin an image may increase and any numbers of pixels given below are byway of example only.

The image is received (block 202) and is scaled down (block 204) tocreate a modified image 20 that is a version of the input image but hasa lower resolution than the input image. Image segmentation is performed(in block 206) on the modified image 20 which creates an initial binarysolution 22 (which may also be referred to as a binary mask). Thisinitial binary solution 22 (or initial binary segmentation) labels imageelements (e.g. pixels) in the modified image as being either foregroundor background (as described above the labels may be applied to all theimage elements in the image or to image elements in a portion of theimage). In an embodiment of an initial binary solution, a parameter α,which is associated with an image element and may be referred to as anopacity value or binary segmentation parameter, has a value of zero orone. The initial binary solution 22 is then up-scaled and smoothed(block 208) to create an interim solution 24 which has a higherresolution than the initial binary solution 22 and the modified image20. This interim solution 24 is a smooth, non-binary interpolated maskand may for example be a monochromatic interim solution, such as agray-scale or red-scale solution, or a full color solution. In anembodiment of the interim solution, the parameter α, which may bereferred to as a non-binary segmentation parameter, has a value betweenzero and one. In many embodiments, the interim solution 24 has the sameresolution as the input image 20 but other resolutions may beappropriate in some applications.

In order to obtain a final binary segmentation solution 26 (which mayalso be referred to as a binary high resolution mask), a threshold isapplied to the interim solution 24 (in block 210). The final binarysegmentation solution 26 has substantially the same resolution as theinterim solution and has a higher resolution than the initial binarysolution 22 and the modified image 20. The final binary segmentationsolution provides a label for image elements (e.g. pixels) in the image(e.g. in all or a part of the image) as being either foreground orbackground (e.g. α=0 or 1) and this solution can then be used by imageediting tools to extract a portion of the image or for another purpose(e.g. modification or correction of a portion of image). The solutionmay also be used for image re-composition, e.g. extraction of aforeground from one image (such as a person) and composition of theextracted foreground onto a new background (such as a street). In someembodiments, further processing may be applied to the final binarysegmentation solution 26. The results of the segmentation may bedisplayed to a user via a display (not shown in FIG. 2). e.g. theforeground or the background portions may be displayed or the twoportions may be displayed as different layers within an image editingapplication or tool. The individual steps of the method shown in FIG. 2are described in more detail below.

Although other methods may perform a part of the image segmentationprocess on a scaled down version of the input image, these other methodsstill use the original resolution input image data in order to infer thesegmentation solution at the original resolution (i.e. the resolution ofthe image received in block 202). The method shown in FIG. 2 does notuse the original resolution input image data (as received in block 202)or the modified image 20 (which is a version of the input image havinglower resolution) in creating the binary segmentation in the originalresolution image (i.e. in creating the final binary segmentationsolution 26) and therefore may be considered ‘data independent’. Themethod of FIG. 2 reduces the processing required to perform imagesegmentation and hence reduces the runtime. This in turn improves theuser experience as they do not experience large delays when extractingforeground from a digital image.

Where further processing is applied to the final binary segmentationsolution 26 (i.e. after block 210), this may, in some examples, use theoriginal resolution input image data (e.g. as received in block 202).

The input image, received in block 202, may be directly acquired (e.g.by a digital camera) or may be a digitized image (e.g. as created usinga scanner) and although the method is described as being applied toimages comprising a large number of image elements (e.g. pixels), themethod may also be applied to images which comprise smaller numbers ofimage elements (e.g. 2 MPixel images). In an embodiment, the method maybe applied to all images (i.e. to any input image received irrespectiveof the number of image elements in the image) or in another embodimentit may be applied to images where it is more efficient to use the methodof FIG. 2 than to perform the image segmentation on the originalresolution image (e.g. see the embodiment described below with referenceto FIG. 7).

The down-scaling of the input image (in box 204, e.g. as performed bythe down-scaling engine 105 in FIG. 1) may be performed using anysuitable method and considering any appropriate factors for theapplication. In an embodiment, a box filter may be used (e.g. a boxfilter with fixed point arithmetic and threads parallelized over imageregions) and in an example of such an embodiment, the down-scaling maybe performed by looping over source image elements (i.e. image elementsin the original image) and averaging them over each destination imageelement region (i.e. image elements in the modified image). In anembodiment, the input image may be down-scaled so that the modifiedimage 20 is of a particular overall size in terms of the number of imageelements (e.g. 1.5 MPixels) and in another embodiment, the input imagemay be down-scaled so that the modified image 20 has a predefined valueof its longest dimension (e.g. 1024 pixels). In other embodiments,different criteria may alternatively be used.

The image segmentation of the modified image 20 (in block 206, e.g. asperformed by the image segmentation engine 106 in FIG. 1) may beperformed using any suitable segmentation method. An example of asuitable method (referred to herein as ‘GrabCut’) is described in U.S.patent application Ser. No. 10/861,771 (Publication No. 2005/0271273)which is incorporated herein by reference in its entirety. A briefoverview of an embodiment of GrabCut is provided below with reference toFIG. 3. It will be appreciated that alternative segmentation methods mayalternatively be used and GrabCut provides just one example of asuitable method. FIG. 3 is a flow diagram of an example method of imagesegmentation. This method uses graph cuts applied to a user definedbimap or trimap to segment an image into foreground and backgroundregions. The image, which is considered to comprise pixels z_(n) incolor space, is segmented into a bimap or trimap based on user input(block 302). The user defines at least a background region (T_(B)) andmay also specify an unknown region (T_(U)) and/or a foreground region(T_(F)). Where the user defines only the background region, theforeground region is set to be the empty set (T_(F)=Ø) and the unknownregion is set to the complement of the background region (T_(U)= T_(B)). A parameter α_(n), which may be referred to as an opacity value, foreach pixel is used to express the segmentation of the image andinitially the opacity values are initialized as follows:α_(n)=0 for nεT _(B)α_(n)=1 for nεT _(U)

Gaussian mixture models (GMMs) may be used in defining the foregroundand background properties (in block 304) and the foreground andbackground GMMs are initialized from sets α_(n)=0 and α_(n)=1respectively. Each GMM (one for the background and one for theforeground) is taken to be a full-covariance Gaussian mixture with Kcomponents (e.g. K=5). A vector k=(k₁, . . . , k_(n)) is used, withk_(n)ε{1, . . . , K} to assign a unique GMM component (one componenteither from the background or the foreground model) to each pixelaccording to the opacity value α_(n). For each pixel in the unknownregion (i.e. for each n in T_(U)) GMM components are assigned using:

$\begin{matrix}{k_{n}:={\underset{k_{n}}{argmin}{D_{n}\left( {\alpha_{n},k_{n},\theta,z_{n}} \right)}}} & (1)\end{matrix}$And then the GMM parameters are learnt from the data z using:

$\begin{matrix}{\underset{\_}{\theta}:={\underset{\underset{\_}{\theta}}{argmin}{U\left( {{\underset{\_}{\alpha},k}{,\underset{\_}{\theta},z}} \right)}}} & (2)\end{matrix}$

The Gibbs energy for segmentation may be defined (in block 306) as:E(α,k,θ,z)=U(α,k,θ,z)+V(α,z)  (3)Where the parameter θ describes the image foreground and backgrounddistributions (as learned in block 304 using equation (2)), V is asmoothness term computed by Euclidean distance in color space, Uevaluates the fit of opacity distribution α to the data z, given theparameter θ and taking account of the color GMM models, where:U(α,k,θ,z):=ΣD _(n)(α_(n) ,k _(n) ,θ,z _(n))  (4)Where:D _(n(α) _(n) ,k _(n) ,θ,z _(n))=−log p(z _(n)|α_(n) ,k _(n),θ)−logπ(α_(n) ,k _(n))ρ ( ) is a Gaussian probability distribution and π ( ) are mixtureweighting coefficients, so that (up to a constant):

$\begin{matrix}{{D_{n}\left( {\alpha_{n},k_{n},\underset{\_}{\theta},z_{n}} \right)} = {{{- \log}\;{\pi\left( {\alpha_{n},k_{n}} \right)}} + {\frac{1}{2}\log\;\det{\sum\left( {\alpha_{n},k_{n}} \right)}} + {{\frac{1}{2}\left\lbrack {z_{n} - {\mu\left( {\alpha_{n},k_{n}} \right)}} \right\rbrack}^{T}{\sum{\left( {\alpha_{n},k_{n}} \right)^{- 1}\left\lbrack {z_{n} - {\mu\left( {\alpha_{n},k_{n}} \right)}} \right\rbrack}}}}} & (5)\end{matrix}$Therefore the parameters of the model are:θ={π(α,k),λ(α,k)Σ(α,k),α=0,1k=1 . . . K}  (6)The smoothness term V is computed as follows, (where the contrast termis computed using Euclidean distance in the color space):

$\begin{matrix}{{V\left( {\underset{\_}{\alpha},z} \right)} = {{\gamma{\sum\limits_{{({m,n})} \in C}{\left\lbrack {\alpha_{n} \neq \alpha_{m}} \right\rbrack\exp}}} - {\beta{{z_{m} - z_{n}}}^{2}}}} & (7)\end{matrix}$Where C is the set of pairs of neighboring pixels. When the constantβ=0, the smoothness term is simply the well-known Ising prior,encouraging smoothness everywhere, to a degree determined by theconstant γ. In an implementation, β may be greater than zero to relaxthe tendency to smoothness in regions of high contrast. The constant βmay be chosen as:

$\frac{1}{\beta} = {2\left\langle \left( {z_{m} - z_{n}} \right)^{2} \right\rangle}$Where < > denotes expectation over an image sample. In animplementation, such a choice of β ensures that the exponential term inV (equation (7)) switches appropriately between high and low contrast.

Given the energy model described above, the foreground and backgroundportions can be computed (in block 308) by using a standard minimum cutalgorithm to solve:

$\begin{matrix}{\min\limits_{\{{\alpha_{n}:{n \in T_{U}}}\}}{\min\limits_{k}{E\left( {\underset{\_}{\alpha},k,\underset{\_}{\theta},z} \right)}}} & (8)\end{matrix}$All pixels in the trimap region T_(B) are assigned to background and allpixels in T_(F) to foreground. Pixels in T_(U) are assigned to eitherforeground or background, depending on the result of the energyminimization (equation (8)).

The process may be repeated, as indicated by the dotted arrow 30, in aniterative minimization process (or other iterative optimization process)until convergence. Further processing may then be used, such as bordermatting.

In another example of further processing, an additional imagesegmentation process may be performed. In such an embodiment, a band orribbon of image elements is identified from the final segmentationsolution 26 (e.g. following block 210 in FIG. 2). This band or ribboncomprises image elements within a defined distance of aforeground/background transition. Image segmentation at the originalresolution of the input image may then be performed on those imageelements within the band or ribbon and the results used to update thefinal segmentation solution 26.

Having segmented the image (in block 206) and generated an initialbinary solution 22, this initial binary solution is up-scaled (orup-sampled) and smoothed to generate an interim solution 24 (in block208, e.g. as performed by the up-scaling and smoothing engine 107 inFIG. 1) which has a higher resolution than the initial binary solution22 and which is a smooth, non-binary interpolated solution (as describedabove). FIG. 4 shows a flow diagram of an example method of up-scalingand smoothing which may be used. In this method, the initial binarysolution 22 is first up-scaled using nearest-neighbor up-scaling (block402) which generates a binary intermediate solution of higher resolutionthan the initial binary solution. This intermediate solution is thensmoothed using a 2D Gaussian function as an interpolating kernel (block404) in order to create the interim solution 24. If the binaryintermediate solution was used instead of the final binary segmentationsolution as the output from the method (i.e. without performing thesmoothing operation), the segmentation would be of poor quality becauseof up-scaling artifacts.

In another embodiment, however, the convolution and up-scaling may beperformed in a single step (block 502), as shown in FIG. 5. In thisembodiment, a Gaussian kernel is sampled at the image element centers inthe interim solution (i.e. the output image element centers for thisstep which are more closely spaced than the image element centers in theinitial binary solution) and convolved with the initial binary solution22 to generate the interim solution 24. As described above, the interimsolution 24 is a non-binary solution of higher resolution than theinitial binary solution 22 and may be referred to as a monochrome orgray-scale solution. A one-dimensional (1D) representation 500 of thisoperation, also in FIG. 5, which uses pixels as the image element, showsthe pixel centers 504 from the initial binary solution 22, a graphicalrepresentation 506 of the initial binary solution 22, a Gaussianfunction 508 and the pixel centers 510 from the resultant interimsolution 24. In this 1D example, the opacity value (which mayalternatively be referred to as a gray-scale value or non-binarysegmentation parameter) of the pixel marked by arrow 512 comprises aweighted sum of the four opacity values α₁-α₄. The weights are given bythe Gaussian interpolation function, as indicated by the dotted lines inFIG. 5. By performing the convolution and up-scaling in a single step,as shown in FIG. 5, the amount of computation that is required toperform the interpolation is reduced (e.g. M² compared to (Mu)², where uis the up-scaling factor and the Gaussian interpolation functioncomprises a M×M kernel). The method shown in FIG. 5 provides anefficient method of smoothly up-scaling binary images for use in imagesegmentation.

In order to further reduce the computational requirements forinterpolation, the interpolation may be performed in two passes (e.g. byprocessing rows and columns of the image in two separate passes) and a1D Gaussian kernel may be used (e.g. a 1×N kernel followed by a N×1kernel rather than using a N×N kernel, which reduces the amount ofcomputation for each pixel from N² multiply-add operations to 2N, whereN is an integer). FIG. 6 shows a graphical representation of thisoptimization of the up-scaling and smoothing process (of block 208). Ina first step (arrow 602), sampling and convolution occurs in thex-dimension (or horizontal dimension i.e. processing rows) to generatean intermediate solution 64 (e.g. 300×40 pixels in size, for anup-scaling factor of 5) from the initial binary solution 62 (e.g. 60×40pixels). The sampling and convolution in the γ-dimension (or verticaldimension, arrow 604, i.e. processing columns) is then applied to theintermediate solution 64 to create the interim solution 66 (e.g. 300×200pixels). This optimization provides larger savings where a bigger kernelis used but may be used for any size of kernel and may be used witheither of the methods described above (e.g. the two passes may beimplemented within the single step of block 502 shown in FIG. 5).

In an example, the standard deviation of the Gaussian kernel used in themethods described above is, in terms of image elements (e.g. pixels),approximately 0.74 times the up-scaling factor (in the interim solutionimage space, or 0.74 pixels in the initial binary solution image space).Although the above description refers to the use of a Gaussian functionas an interpolating or smoothing kernel, it will be appreciated thatother functions may alternatively be used for the interpolation, such asa Lanczos filter, tent filter or cubic polynomial. Additionally it willbe appreciated that the two pass process shown in FIG. 6 and describedabove may be used with any separable kernel and not just with a Gaussiankernel.

Having generated an interim solution 24 (in block 208), a threshold isapplied (in block 210, e.g. as performed by the thresholding engine 108in FIG. 1) to create the final binary segmentation solution 26. Thisthreshold (which may be a user specified threshold 103, as shown inFIG. 1) may be set at the mid-point, e.g. the threshold, which isapplied to the opacity values a, is, for example, set at 0.5, oralternatively another value may be used (e.g. a value higher than 0.5may be used in an embodiment which favors background image elementsabove foreground image elements).

Once the final binary segmentation solution 26 has been generated (inblock 210), the solution may be displayed to a user via a displaydevice. In some embodiments, the solution 26 may be processed furtherbefore being presented to the user (as described above). Once thesolution has been displayed to the user, the user may refine thesegmentation through user editing. This user editing may result in afurther image segmentation process being performed and this may use oneof the methods described herein.

FIG. 7 is a flow diagram of another example method of performing imagesegmentation which is a variation of that shown in FIG. 2 and describedabove. In this method, a decision is made (in block 702, e.g. asperformed by the selection engine 109 in FIG. 1) which determineswhether the image segmentation is performed on the original input image(in block 704) or on a modified image which comprises a reducedresolution version of the image (in block 206). The decision may be made(in block 702) by comparing a size parameter of the image, S, with athreshold, Th. In an embodiment, the size parameter is the number ofimage elements in the original input image and the threshold may, forexample, be set at 1.3 or 1.5 MPixels. If the image file (received inblock 202) has a size parameter which is equal in size or larger thanthe threshold size (i.e. the size parameter is not smaller than thethreshold size), it is down-scaled to a smaller predefined size, e.g.0.8 or 1.0 MPixels (in block 204). In another embodiment, the sizeparameter is the longest dimension of the image in terms of imageelements and the threshold may, for example, be set at 1280 pixels. Ifthe longest dimension of the image (received in block 202) is 1280pixels or more, the image is down-scaled to a smaller predefined size,e.g. such that its longest dimension is 1024 pixels (in block 204).

Where the original image (received in block 202) is segmented withoutdown-scaling (in block 704), any suitable image segmentation method maybe used. In an example, the GrabCut method, as described above withreference to FIG. 3, may be used.

The values of the thresholds given above are provided by way of exampleonly and other values may alternatively be used. In an embodiment, thethreshold and the predefined size may be the same, such that all imageswhich are larger than (or not smaller than) the predefined size (howeverthis is specified) are downscaled to the predefined size. In anotherembodiment, a predefined size may not be used and instead a down-scalingfactor may be defined. In this embodiment, if the size parameter of theimage exceeds the threshold (‘Yes’ in block 702), the image isdown-scaled (in block 204) by the predefined down-scaling factor beforebeing segmented (in block 206). The values of the threshold, smallerpredefined size and/or down-scaling factor may be set to maximize theefficiency of the method, dependent upon the processing power available,the speed required and the required quality of the segmentation.

The methods described above may be implemented in an image editing toolwithin a software application. In an embodiment, the softwareapplication is an image editing application. In another embodiment, thesoftware application is not a dedicated image editing application, butmay instead be a word processing application, a spreadsheet application,a slide presentation application, a database application, an emailapplication etc. Where a number of software applications are combinedwithin a multiple functionality application, the image editing tool maybe available within each application and may be presented to the user inthe same or a similar manner in each application within the multiplefunctionality application. In an example, a dedicated control 802 forimage segmentation may be provided within a ribbon-shaped user interface804 above the software application workspace 806, as shown in theschematic diagram of FIG. 8.

When a user clicks (e.g. with a mouse or other pointing device, whichmay include a finger if the display device is touch sensitive) on thededicated control 802, having selected an image 808 which is displayedin the software application workspace 806, one of the methods (e.g. themethod shown in FIG. 2 or FIG. 7) described herein is performed, forexample, the step of down-scaling the image to generate a modifiedversion of the image may be performed in response to receiving a userinput, such as a user click. The image 808 may, for example, have beenpasted into a word processing document, a spreadsheet, an email, adatabase or a slide presentation. User interaction may be used (e.g.user brush strokes 102, as shown in FIG. 1) to define the bimap ortrimap which is used in segmentation of the image (e.g. in block 302 ofFIG. 3) and this user input may be provided before or after clicking onthe dedicated control 802. In an example, the user marks a rectangle onthe image (e.g. as indicated by dotted rectangle 810) and this has theeffect that the initial background region (e.g. T_(B) using the notationof the GrabCut example provided above) is set to the area outside themarked rectangle. In another example, the background region may be setto comprise a strip of image elements (e.g. pixels) around the outsideof the marked rectangle. Other forms of user input may be used and theuser input received may be interpreted in different ways in setting theinitial background/foreground regions.

FIG. 9 illustrates various components of an exemplary computing-baseddevice 900 which may be implemented as any form of a computing and/orelectronic device, and in which embodiments of the methods describedherein may be implemented.

Computing-based device 900 comprises one or more processors 902 whichmay be microprocessors, controllers or any other suitable type ofprocessors for processing computing executable instructions to controlthe operation of the device in order to perform image segmentation, asdescribed herein. Platform software comprising an operating system 904or any other suitable platform software may be provided at thecomputing-based device to enable application software 906 to be executedon the device. The application software 906 may include software (i.e.executable instructions) for performing image segmentation or separatesoftware 908 may be provided. Where separate software is provided, thismay be called by the application software 906 or may be called directlyby the user (e.g. as an image segmentation application).

The computer executable instructions may be provided using anycomputer-readable media, such as memory 910. The memory is of anysuitable type such as random access memory (RAM), a disk storage deviceof any type such as a magnetic or optical storage device, a hard diskdrive, or a CD, DVD or other disc drive. Flash memory, EPROM or EEPROMmay also be used. Although the memory is shown within thecomputing-based device 900 it will be appreciated that the storage maybe distributed or located remotely and accessed via a network or othercommunication link (e.g. using communication interface 914).

The memory 910 may comprise an image store 912 for storing the imageswhich are segmented using the methods described herein. In anembodiment, the image file may be received (in block 202) having beenaccessed from the image store 912. In another embodiment, the image filemay be received from another location, e.g. via a communicationinterface 914, and stored in the image store 912. The communicationinterface 914 is arranged to send/receive information over a network916. Any suitable network technology (including wired and wirelesstechnologies) and network protocol(s) may be used.

The computing-based device 900 also comprises an input/output controller918 arranged to output display information to a display device 920 whichmay be separate from or integral to the computing-based device 900. Thedisplay information may provide a graphical user interface and may bearranged to display the results of the image segmentation methoddescribed herein to the user. The input/output controller 918 is alsoarranged to receive and process input from one or more devices, such asa user input device 922 (e.g. a mouse or a keyboard). This user inputmay be used to initiate image segmentation (e.g. by clicking control802), to select the image to be segmented, to define a bimap/trimap (asused in block 302 of FIG. 3) etc. In an embodiment the display device920 may also act as the user input device 922 if it is a touch sensitivedisplay device. The input/output controller 918 may also output data todevices other than the display device, e.g. a locally connected printingdevice (not shown in FIG. 9).

Although the present examples are described and illustrated herein asbeing implemented in the system shown in FIG. 9, the system described isprovided as an example and not a limitation. As those skilled in the artwill appreciate, the present examples are suitable for application in avariety of different types of computing systems.

The term ‘computer’ is used herein to refer to any device withprocessing capability such that it can execute instructions. Thoseskilled in the art will realize that such processing capabilities areincorporated into many different devices and therefore the term‘computer’ includes PCs, servers, mobile telephones, personal digitalassistants and many other devices.

The methods described herein may be performed by software in machinereadable form on a tangible storage medium. Examples of tangible (ornon-transitory) storage media include disks, thumb drives, memory etcand do not include propagated signals. The software can be suitable forexecution on a parallel processor or a serial processor such that themethod steps may be carried out in any suitable order, orsimultaneously.

This acknowledges that software can be a valuable, separately tradablecommodity. It is intended to encompass software, which runs on orcontrols “dumb” or standard hardware, to carry out the desiredfunctions. It is also intended to encompass software which “describes”or defines the configuration of hardware, such as HDL (hardwaredescription language) software, as is used for designing silicon chips,or for configuring universal programmable chips, to carry out desiredfunctions.

Those skilled in the art will realize that storage devices utilized tostore program instructions can be distributed across a network. Forexample, a remote computer may store an example of the process describedas software. A local or terminal computer may access the remote computerand download a part or all of the software to run the program.Alternatively, the local computer may download pieces of the software asneeded, or execute some software instructions at the local terminal andsome at the remote computer (or computer network). Those skilled in theart will also realize that by utilizing conventional techniques known tothose skilled in the art that all, or a portion of the softwareinstructions may be carried out by a dedicated circuit, such as a DSP,programmable logic array, or the like.

Any range or device value given herein may be extended or alteredwithout losing the effect sought, as will be apparent to the skilledperson.

It will be understood that the benefits and advantages described abovemay relate to one embodiment or may relate to several embodiments. Theembodiments are not limited to those that solve any or all of the statedproblems or those that have any or all of the stated benefits andadvantages. It will further be understood that reference to ‘an’ itemrefers to one or more of those items.

The steps of the methods described herein may be carried out in anysuitable order, or simultaneously where appropriate. Additionally,individual blocks may be deleted from any of the methods withoutdeparting from the spirit and scope of the subject matter describedherein. Aspects of any of the examples described above may be combinedwith aspects of any of the other examples described to form furtherexamples without losing the effect sought.

The term ‘comprising’ is used herein to mean including the method blocksor elements identified, but that such blocks or elements do not comprisean exclusive list and a method or apparatus may contain additionalblocks or elements.

It will be understood that the above description of a preferredembodiment is given by way of example only and that variousmodifications may be made by those skilled in the art. The abovespecification, examples and data provide a complete description of thestructure and use of exemplary embodiments of the invention. Althoughvarious embodiments of the invention have been described above with acertain degree of particularity, or with reference to one or moreindividual embodiments, those skilled in the art could make numerousalterations to the disclosed embodiments without departing from thespirit or scope of this invention.

The invention claimed is:
 1. A system comprising: one or more processorsconfigured to: receive an image; generate a modified image from theimage, the modified image having a lower image resolution than theimage; segment at least a part of the modified image into a backgroundportion and a foreground portion to create an initial binary solution,the initial binary solution comprising data labeling a plurality ofimage elements in the modified image as either background or foreground;up-scale and smooth the initial binary solution to create an interimsolution having a higher resolution than the initial binary solution andcomprising a non-binary segmentation parameter associated with each of aplurality of image elements in the interim solution; and based on athreshold, create a final binary segmentation solution from the interimsolution, the final binary segmentation solution having substantiallythe same resolution as the interim solution and comprising data labelinga plurality of image elements in the received image as either backgroundor foreground.
 2. A system according to claim 1, wherein the one or moreprocessors are configured to up-scale and smooth without using thereceived image.
 3. A system according to claim 1, wherein the one ormore processors being configured to up-scale and smooth includes the oneor more processors being configured to interpolate the initial binarysolution by convolution with a smoothing kernel to compute a non-binarysegmentation parameter for each of a plurality of image elements in theinterim solution.
 4. A system according to claim 3, wherein thesmoothing kernel comprises a Gaussian kernel.
 5. A system according toclaim 4, wherein the Gaussian kernel comprises a one-dimensionalGaussian kernel and wherein interpolating the initial binary solution byconvolution with a smoothing kernel comprises processing rows andcolumns of the initial binary solution in two separate passes.
 6. Asystem according to claim 5, wherein a standard deviation of theone-dimensional Gaussian kernel is substantially equal to 0.74 times thesize of an image element in the initial binary solution.
 7. A systemaccording to claim 1, wherein the one or more processors beingconfigured to segment the at least part of the modified image into thebackground portion and the foreground portion to create the initialbinary solution includes the one or more processors being configured to:segment the modified image into a foreground portion and a backgroundportion; determine properties corresponding to the foreground andbackground portions; update the background and foreground propertiesbased on the portions; and update the foreground and background portionsbased on the updated background and foreground properties.
 8. A systemaccording to claim 1, the one or more processors being furtherconfigured to: display, on a display device, at least one of abackground and a foreground portion of the image, the background andforeground portions being determined using the final binary segmentationsolution.
 9. A system according to claim 1, the one or more processorsbeing configured to implement an image editing tool in a softwareapplication.
 10. A system according to claim 9, wherein the softwareapplication comprises one of a word processing application, aspreadsheet application, a slide presentation application, a databaseapplication and an email application.
 11. A system according to claim 1,wherein the one or more processors being configured to generate themodified image from the image includes the one or more processors beingconfigured to generate the modified image from the image in response toreceiving at least one user input.
 12. A system comprising: one or moreprocessors configured to: access an image; and if a size parameterassociated with the image is not less than a predefined threshold:down-scale the image to create a modified image from the image, themodified image having a lower image resolution than the image; segmentthe modified image to create an initial binary solution comprising abinary parameter associated with each of a plurality of image elementsin the modified image, the binary parameter assigning an image elementto a background or a foreground portion; up-scale and smooth the initialbinary solution to form an interim solution, the interim solution havinga higher resolution than the initial binary solution and comprising anon-binary parameter associated with each of a plurality of imageelements in the interim solution; and generate a final binarysegmentation solution based on a threshold value of the non-binaryparameter, the final binary segmentation solution having a higherresolution than the initial binary solution and comprising dataassigning a plurality of image elements in the accessed image to eithera background or a foreground portion.
 13. A system according to claim12, wherein the one or more processors being configured to up-scale andsmooth includes the one or more processors being configured to up-scaleand smooth without using the accessed image.
 14. A system according toclaim 12, the one or more processors being further configured to displayat least one background or foreground portion of the image.
 15. A systemaccording to claim 12, wherein the size parameter comprises one of anumber of image elements in the image and a longest image dimension. 16.A system according to claim 12, wherein the one or more processors beingconfigured to up-scale and smooth includes the one or more processorsbeing configured to: sample a smoothing kernel at an image elementcenter in the interim solution; convolve the smoothing kernel with theinitial binary solution to compute a non-binary parameter for the imageelement; and repeat the sampling and convolving steps for each of theplurality of image elements in the interim solution.
 17. A systemaccording to claim 16, wherein the sample and convolve are performed intwo passes, one pass using a 1×N Gaussian kernel and one pass using aN×1 Gaussian kernel, where N is an integer.
 18. A system comprising: oneor more processors configured to: access an image; down-scale the imageto create a modified version of the image having a lower imageresolution than the image; segment the modified version of the image togenerate an initial binary segmentation, the initial binary segmentationcomprising data labeling a plurality of image elements in the modifiedversion of the image as part of a background portion or a foregroundportion; generate an interim solution having a higher resolution thanthe initial binary segmentation by, for each of a plurality of imageelements in the interim solution, computing a non-binary value byconvolving an interpolation kernel centered on the image element withthe initial binary segmentation; based on a threshold, generate a finalbinary segmentation solution having substantially the same resolution asthe interim solution and comprising data labeling a plurality of imageelements in said image as part of a background portion or a foregroundportion; and display at least one background or foreground portion ofsaid image.
 19. A system according to claim 18, wherein the one or moreprocessors being configured to segment the modified of the imageincludes the one or more processors being configured to: segment themodified version of the image into a foreground portion and a backgroundportion; determine properties corresponding to the foreground andbackground portions; update the background and foreground propertiesbased on the portions; and update the foreground and background portionsbased on the updated background and foreground properties.
 20. A systemaccording to claim 18, wherein computing a non-binary value byconvolving an interpolation kernel centered on the image element withthe initial binary segmentation uses a one-dimension Gaussian kernel andis performed in two passes, one operating on rows of image elements andone operating on columns of image elements.